package com.example.demo_test.web.service.impl;

import com.example.demo_test.web.service.TestService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Service;

/**
 * @Classname TestServiceImpl
 * @Description TODO
 * @Date 2019/1/28 15:24
 * @Created by pc
 */
@Service
public class TestServiceImpl implements TestService {

    private static String ipAddr;

    public static String getIpAddr() {
        return ipAddr;
    }

    @Value("${static.ipAddr}")
    private String hahah;

    @Value("${static.ipAddr}")
    private static String yes;


    public String getHahah(){
        return hahah;
    }

    @Override
    public String getYes() {
        return yes;
    }

    @Value("${static.ipAddr}")
    public void setIpAddr(String ipAddr) {
        TestServiceImpl.ipAddr = ipAddr;
    }

    @Override
    public String sayHello() {
        return ipAddr;
    }
}
